<template>
  <div class="app-container">
    <div class="layout-content">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
import TabBar from '@/components/TabBar'
import { getColumn } from '@/api/home'
export default {
  name: 'AppShops',
  data() {
    return {
      tabbars: [],
      active: 0
    }
  },
  components: {
    TabBar
  },
  created() {
    this.initData()
  },
  methods: {
    initData() {
      getColumn({ type: 0 }).then(res => {
        console.log(res)
        for (let i = 0; i < res.data.length; i++) {
          this.tabbars.push({
            title: res.data[i].name,
            to: res.data[i].url,
            icon: res.data[i].imgUrl
          })
        }
      })
    },
    handleChange(v) {
      console.log('tab value:', 1)
    }
  }
}
</script>
